package me.jtx.poplar.article.service.impl;

import java.util.UUID;

import javax.annotation.PostConstruct;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import me.jtx.poplar.article.model.entity.Article;
import me.jtx.poplar.article.model.repository.ArticleRepository;
import me.jtx.poplar.article.service.ArticleService;
import me.jtx.poplar.core.data.BaseJpaServiceImpl;

/**
 * 
 *
 * @author: Tong Huazhong(jsyzthz@gmail.com)
 * @copyright: &copy; 2016, Tong Huazhong
 */
@Service
@Transactional
public class ArticleServiceImpl extends BaseJpaServiceImpl<Article, UUID> implements ArticleService {
	private @Autowired ArticleRepository articleRepository;
	
	@PostConstruct
	@Override
	public void setupService() {
		this.baseJpaRepository = articleRepository;
		this.entityClass = Article.class;
		this.baseJpaRepository.setupEntityClass(Article.class);
	}

}
